package com.mentalhealthplatform.global.elasticsearch;

import com.mentalhealthplatform.appModels.Tweet;
import org.springframework.data.elasticsearch.annotations.Query;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TweetElasticsearchV2 extends ElasticsearchRepository<Tweet, Long> {
    @Query("{\"match\": {\"description\": {\"query\": \"?0\", \"analyzer\": \"ik_smart\"}}}")
    List<Tweet> searchByContent(String content);
}